<template>
  <div>
    <h2>Home组件内容</h2>
    <div>
      <ul class="nav nav-tabs">
        <li>
          <router-link class="list-group-item" active-class="active" to="/home/news">News</router-link>
        </li>
        <li>
          <routerLink class="list-group-item" active-class="active" to="/home/message">Message</routerLink>
        </li>
      </ul>
      <!-- 路由缓存 为什么要缓存路由，因为某些情况下我不想切换其他路由组件时之前的路由组件数据就没了-->
      <!-- 注意这么写所有用它的路由组件都会缓存 -->
      <!-- <keep-alive>
         <router-view></router-view>
      </keep-alive> -->
      <!-- 我们只要一个路由组件缓存怎么写？include="News" 名字为组件名字name -->
      <keep-alive include="News">
         <router-view></router-view>
      </keep-alive>
    </div>
  </div>
</template>

<script>
export default {
    name: "Home",
}
</script>

<style>

</style>